package com.hujie.sqlqueryes.dto;

import lombok.Data;

@Data
public class DslResultDTO {
    private boolean success;
    private String dsl;
    private String message;
    
    public static DslResultDTO success(String dsl) {
        DslResultDTO result = new DslResultDTO();
        result.success = true;
        result.dsl = dsl;
        return result;
    }
    
    public static DslResultDTO error(String message) {
        DslResultDTO result = new DslResultDTO();
        result.success = false;
        result.message = message;
        return result;
    }
    
    public boolean isSuccess() {
        return success;
    }
    
    public String getDsl() {
        return dsl;
    }
    
    public String getMessage() {
        return message;
    }
}